<?php use_helper('Javascript','I18N')?>
<div class="faved">
  <?php if($sf_user->isAuthenticated() && $idea->favByUser($sf_user->getAppUser()->getId())):?>
    <?php echo image_tag('48-lightbulb.png',array('id' => 'fav_light'))?>
  <?php else:?>
    <?php echo image_tag('48-off-lightbulb.png',array('id' => 'fav_light'))?>
  <?php endif?>
</div>

<div class="idea_container">
  <div id="idea_header">
    <div id="idea_title">
      <h1> <?php echo $idea->getName() ?> </h1>
    </div>
  </div>
  <div id="idea_content">
    <p> <?php echo $idea->getDescription() ?> <p>
  </div>
</div>

<?php if($sf_user->hasFlash('notice') || $sf_user->hasFlash('error')):?>
  <?php slot('notifications')?>
    <?php if ($sf_user->hasFlash('notice')): ?>
      <div class="notice"><?php echo $sf_user->getFlash('notice') ?></div>
    <?php endif; ?>
    <?php echo javascript_tag("jQuery('#notifications').notification( {'duration': 10, 'show-method': 'slideDown', 'hide-method': 'slideUp'} )")?>
  <?php end_slot('notifications'); ?>
<?php endif?>

<?php slot('operations')?>
  <li id="fav_operation"> <?php echo link_to_remote("Fav",array('url' => '@fav_idea?id='. (($idea instanceof sfOutputEscaper)? $idea->getRawValue()->getId() :$idea->getId),
                                                                   'update' => 'notifications'))?></li>
  <li id="colaborate_operation"> <?php echo link_to_function("Colab",array('url' => '@colab_idea?id='. (($idea instanceof sfOutputEscaper)? $idea->getRawValue()->getId() :$idea->getId),
                                                                   'update' => 'notifications')) ?></li>
<?php end_slot('operations')?>
